package model;

public class CharOutput implements Output{

	private final char character;
	private final Output previousOutput;
	
	/**
	 * Constructor of {@link CharacterOutput}
	 * @param character is single {@link Character}.
	 * @param previousOutput is the previous {@link Output}.
	 */
	public CharOutput(final char character,final Output previousOutput) {
		this.character = character;
		this.previousOutput = previousOutput;
	}
	@Override
	public String getString() {
		return this.previousOutput.getString() + this.character;
	}
}
